This demo illustrates how to design an ORMapping on top of the Microsoft demo database "Petshop".
The example consists of two databases. Since one ecospace can only be mapped to one database, this example has two models and two OR mappings.
(MSPetShopMapping.xml and MSPetShopOrdersMapping.xml).
In the Orders database, the mapping is very straight forward. In the Petshop database there are a few quirks:
- The tables Category and BannerData have been merged into one class, with two AliasDefs and two KeyDefs.
- The relationship between Account and Signon is modelled as a 1-1 relationship that is embedded in only one side.
In the mapping, the SinglelinkDef in the Account class node uses the same column as the key implementation does. This could have
been modelled like the above example where the two tables have been merged into one class
- The relationship between Profile and Category uses the secondary key in the Category class ("CatName").